# Maintainer: Alexey Pavlov <alexpux@gmail.com>

pkgname=gtk-doc
pkgver=1.24
pkgrel=1
pkgdesc="Documentation tool for public library API (mingw-w64)"
arch=('i686' 'x86_64')
url="http://www.gtk.org/gtk-doc/"
license=("GPL" "FDL")
options=(staticlibs strip)
depends=("docbook-xsl"
         "gnome-doc-utils"
         "perl"
         "vim"
         "yelp-tools"
        )
makedepends=("pkg-config"
             #'jade'
             "libxml2-python"
             "python2"
             'itstool'
             #'dblatex'
            )
optdepends=(#"jade: SGML support"
            #"dblatex: PDF support"
      )
url="http://www.gtk.org/gtk-doc/"
source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.xz)
md5sums=('a8b96bacaba04e83531abf8e36d4e476')

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  libtoolize --force --copy
  autoreconf -fi
}

build() {
  mkdir -p "${srcdir}/build-${CHOST}"
  cd "${srcdir}/build-${CHOST}"
  export PYTHON=/usr/bin/python2
  ../${pkgname}-${pkgver}/configure \
    --prefix=/usr \
    --build=${CHOST} \
    --host=${CHOST} \
    --enable-shared \
    --enable-static \
    --with-xml-catalog=/etc/xml/catalog
  make
}

package() {
  cd "${srcdir}/build-${CHOST}"
  make DESTDIR="$pkgdir" install
}
